<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: user/user_main.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_111cd2f11cffd6d6d28d89ee0389ee9e.html">user</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">user_main.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Main user and initialization code This initialize the platform and runs the main user task. All display updates and task are called from here.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdarg.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &quot;<a class="el" href="user__config_8h_source.html">user_config.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="time_8h_source.html">time.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="timer_8h_source.html">timer.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="matrix_8h_source.html">matrix.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="system_8h_source.html">esp8266/system.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="stringsup_8h_source.html">lib/stringsup.h</a>&quot;</code><br />
</div>
<p><a href="user__main_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a918f64eb53db8e8dc694f36a87646476"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a918f64eb53db8e8dc694f36a87646476">R1</a>&#160;&#160;&#160;330000.0</td></tr>
<tr class="separator:a918f64eb53db8e8dc694f36a87646476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a255a2815b9453060f51c6eb22cfed8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a7a255a2815b9453060f51c6eb22cfed8">R2</a>&#160;&#160;&#160;100000.0</td></tr>
<tr class="separator:a7a255a2815b9453060f51c6eb22cfed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab38143b778adc0376cef19233669453b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ab38143b778adc0376cef19233669453b">VERROR</a>&#160;&#160;&#160;0.95</td></tr>
<tr class="separator:ab38143b778adc0376cef19233669453b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac51ccb923f4c4f470f00c1f9aa6e2c2b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ac51ccb923f4c4f470f00c1f9aa6e2c2b">VSCALE</a>&#160;&#160;&#160;(<a class="el" href="user__main_8c.html#ab38143b778adc0376cef19233669453b">VERROR</a>*((<a class="el" href="user__main_8c.html#a918f64eb53db8e8dc694f36a87646476">R1</a>+<a class="el" href="user__main_8c.html#a7a255a2815b9453060f51c6eb22cfed8">R2</a>)/<a class="el" href="user__main_8c.html#a7a255a2815b9453060f51c6eb22cfed8">R2</a>)/1024.0)</td></tr>
<tr class="separator:ac51ccb923f4c4f470f00c1f9aa6e2c2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8c3a7f0ee91987679040299af24bd503"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a8c3a7f0ee91987679040299af24bd503">ets_timer_disarm</a> (<a class="el" href="ets__sys_8h.html#ab895f72aa58b986445e6661c4eacaa86">ETSTimer</a> *ptimer)</td></tr>
<tr class="separator:a8c3a7f0ee91987679040299af24bd503"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ea5d30094305d8b476b09164dd38f3f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a6ea5d30094305d8b476b09164dd38f3f">ets_timer_setfn</a> (<a class="el" href="ets__sys_8h.html#ab895f72aa58b986445e6661c4eacaa86">ETSTimer</a> *ptimer, <a class="el" href="ets__sys_8h.html#a9b98fc011315c1e79ebaf55e92265afa">ETSTimerFunc</a> *pfunction, void *parg)</td></tr>
<tr class="separator:a6ea5d30094305d8b476b09164dd38f3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa527aed56b3e044b16d50ca2f6eeb04d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#aa527aed56b3e044b16d50ca2f6eeb04d">ms_clear</a> ()</td></tr>
<tr class="memdesc:aa527aed56b3e044b16d50ca2f6eeb04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction.  <a href="#aa527aed56b3e044b16d50ca2f6eeb04d">More...</a><br /></td></tr>
<tr class="separator:aa527aed56b3e044b16d50ca2f6eeb04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a579b1507f56ef6a300ed2b6bcb2dca80"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a579b1507f56ef6a300ed2b6bcb2dca80">ms_read</a> ()</td></tr>
<tr class="memdesc:a579b1507f56ef6a300ed2b6bcb2dca80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction.  <a href="#a579b1507f56ef6a300ed2b6bcb2dca80">More...</a><br /></td></tr>
<tr class="separator:a579b1507f56ef6a300ed2b6bcb2dca80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad00817ae93e26408219a68cadd8424fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ad00817ae93e26408219a68cadd8424fa">ms_task</a> (void)</td></tr>
<tr class="memdesc:ad00817ae93e26408219a68cadd8424fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">1000HZ timer task  <a href="#ad00817ae93e26408219a68cadd8424fa">More...</a><br /></td></tr>
<tr class="separator:ad00817ae93e26408219a68cadd8424fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af02c169744cad045548cd4d79e6205e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#af02c169744cad045548cd4d79e6205e4">ms_init</a> ()</td></tr>
<tr class="memdesc:af02c169744cad045548cd4d79e6205e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize 1000HZ timer task.  <a href="#af02c169744cad045548cd4d79e6205e4">More...</a><br /></td></tr>
<tr class="separator:af02c169744cad045548cd4d79e6205e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aaa25ef08319cd23e2cdee0b6405de5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a9aaa25ef08319cd23e2cdee0b6405de5">ntp_setup</a> (void)</td></tr>
<tr class="separator:a9aaa25ef08319cd23e2cdee0b6405de5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3142086fde2f8b44c81c6f78beff1cc2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a3142086fde2f8b44c81c6f78beff1cc2">user_tasks</a> ()</td></tr>
<tr class="separator:a3142086fde2f8b44c81c6f78beff1cc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ad8e3830c026847c00b6d46591dbdb"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ac9ad8e3830c026847c00b6d46591dbdb">adc_read</a> ()</td></tr>
<tr class="memdesc:ac9ad8e3830c026847c00b6d46591dbdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">return system_adc_read scaled to a float T_OUT pin is connected to the junction of a voltage divider R1 and R2 R1 is connected to VCC R2 is connected to ground T_OUT is connected to the junction of R1 and R2 FIXME T_OUT has a loading value  <a href="#ac9ad8e3830c026847c00b6d46591dbdb">More...</a><br /></td></tr>
<tr class="separator:ac9ad8e3830c026847c00b6d46591dbdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c9fec92b60b251c275870d900294a4a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a9c9fec92b60b251c275870d900294a4a">user_loop</a> (void)</td></tr>
<tr class="separator:a9c9fec92b60b251c275870d900294a4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe461d27b9c48d5921c00d521181f12f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#afe461d27b9c48d5921c00d521181f12f">loop</a> ()</td></tr>
<tr class="separator:afe461d27b9c48d5921c00d521181f12f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf488387a6eadb21c378fffd6f4aae63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#acf488387a6eadb21c378fffd6f4aae63">user_help</a> ()</td></tr>
<tr class="separator:acf488387a6eadb21c378fffd6f4aae63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbcd3c10e0fec230495931035509d7a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#afbcd3c10e0fec230495931035509d7a3">user_tests</a> (int argc, char *argv[])</td></tr>
<tr class="memdesc:afbcd3c10e0fec230495931035509d7a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">help functions test parser  <a href="#afbcd3c10e0fec230495931035509d7a3">More...</a><br /></td></tr>
<tr class="separator:afbcd3c10e0fec230495931035509d7a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4b988c39b8bd19b13221ca57e721f96"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ab4b988c39b8bd19b13221ca57e721f96">test_types</a> ()</td></tr>
<tr class="separator:ab4b988c39b8bd19b13221ca57e721f96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53d692b2f2d330182b01bdd9b7f6e97b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a53d692b2f2d330182b01bdd9b7f6e97b">setup</a> (void)</td></tr>
<tr class="memdesc:a53d692b2f2d330182b01bdd9b7f6e97b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="send_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main()</a> Initialize user task  <a href="#a53d692b2f2d330182b01bdd9b7f6e97b">More...</a><br /></td></tr>
<tr class="separator:a53d692b2f2d330182b01bdd9b7f6e97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ab3dd732d619a1e8ab21460d8c002a5e5"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ab3dd732d619a1e8ab21460d8c002a5e5">ms_time</a> = 0</td></tr>
<tr class="separator:ab3dd732d619a1e8ab21460d8c002a5e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae406634b9e0b25eda1da44f1d4ec26c0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ae406634b9e0b25eda1da44f1d4ec26c0">ntp_init</a> = 0</td></tr>
<tr class="separator:ae406634b9e0b25eda1da44f1d4ec26c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b92bd10367d44d30a6d932d9f13b79b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a4b92bd10367d44d30a6d932d9f13b79b">signal_loop</a> = 0</td></tr>
<tr class="separator:a4b92bd10367d44d30a6d932d9f13b79b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae112d79896ed83ac05e155da60e85523"><td class="memItemLeft" align="right" valign="top"><a class="el" href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ae112d79896ed83ac05e155da60e85523">seconds</a> = 0</td></tr>
<tr class="separator:ae112d79896ed83ac05e155da60e85523"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab95878c62fafac494a81c106d05c209a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#ab95878c62fafac494a81c106d05c209a">ip_msg</a> []</td></tr>
<tr class="memdesc:ab95878c62fafac494a81c106d05c209a"><td class="mdescLeft">&#160;</td><td class="mdescRight">test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer  <a href="#ab95878c62fafac494a81c106d05c209a">More...</a><br /></td></tr>
<tr class="separator:ab95878c62fafac494a81c106d05c209a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13f77b252237844d7b8b6e3c3047fe50"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a13f77b252237844d7b8b6e3c3047fe50">skip</a> = 0</td></tr>
<tr class="separator:a13f77b252237844d7b8b6e3c3047fe50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45ce2b1d7e9e1d263ef7e624ed7aefcf"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a45ce2b1d7e9e1d263ef7e624ed7aefcf">last_time10</a> = 0</td></tr>
<tr class="separator:a45ce2b1d7e9e1d263ef7e624ed7aefcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d885e2666c9e4d5e3a05031f68f431e"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a7d885e2666c9e4d5e3a05031f68f431e">last_time50</a> = 0</td></tr>
<tr class="separator:a7d885e2666c9e4d5e3a05031f68f431e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1559c6c23b2e6367e59be081c3b76d54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a1559c6c23b2e6367e59be081c3b76d54">sec</a> = 0</td></tr>
<tr class="separator:a1559c6c23b2e6367e59be081c3b76d54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a01319d7589800db081ee759e210eda"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a8a01319d7589800db081ee759e210eda">loop_cnt</a> = 0</td></tr>
<tr class="separator:a8a01319d7589800db081ee759e210eda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0386f377ca8a674321b268989560fa2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="user__main_8c.html#a0386f377ca8a674321b268989560fa2b">inloop</a> = 0</td></tr>
<tr class="separator:a0386f377ca8a674321b268989560fa2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Main user and initialization code This initialize the platform and runs the main user task. All display updates and task are called from here. </p>
<dl class="section user"><dt>Copyright &copy; 2015 Mike Gore, GPL License</dt><dd></dd></dl>
<dl class="section user"><dt>You are free to use this code under the terms of GPL</dt><dd>please retain a copy of this notice in any code you use it in.</dd></dl>
<p>This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>

<p>Definition in file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a918f64eb53db8e8dc694f36a87646476"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define R1&#160;&#160;&#160;330000.0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00313">313</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="a7a255a2815b9453060f51c6eb22cfed8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define R2&#160;&#160;&#160;100000.0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00315">315</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab38143b778adc0376cef19233669453b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VERROR&#160;&#160;&#160;0.95</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00319">319</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac51ccb923f4c4f470f00c1f9aa6e2c2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VSCALE&#160;&#160;&#160;(<a class="el" href="user__main_8c.html#ab38143b778adc0376cef19233669453b">VERROR</a>*((<a class="el" href="user__main_8c.html#a918f64eb53db8e8dc694f36a87646476">R1</a>+<a class="el" href="user__main_8c.html#a7a255a2815b9453060f51c6eb22cfed8">R2</a>)/<a class="el" href="user__main_8c.html#a7a255a2815b9453060f51c6eb22cfed8">R2</a>)/1024.0)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00321">321</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00332">adc_read()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac9ad8e3830c026847c00b6d46591dbdb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float adc_read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>return system_adc_read scaled to a float T_OUT pin is connected to the junction of a voltage divider R1 and R2 R1 is connected to VCC R2 is connected to ground T_OUT is connected to the junction of R1 and R2 FIXME T_OUT has a loading value </p>
<dl class="section return"><dt>Returns</dt><dd>float </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00332">332</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a8c3a7f0ee91987679040299af24bd503"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ets_timer_disarm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ets__sys_8h.html#ab895f72aa58b986445e6661c4eacaa86">ETSTimer</a> *&#160;</td>
          <td class="paramname"><em>ptimer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a6ea5d30094305d8b476b09164dd38f3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ets_timer_setfn </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ets__sys_8h.html#ab895f72aa58b986445e6661c4eacaa86">ETSTimer</a> *&#160;</td>
          <td class="paramname"><em>ptimer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ets__sys_8h.html#a9b98fc011315c1e79ebaf55e92265afa">ETSTimerFunc</a> *&#160;</td>
          <td class="paramname"><em>pfunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>parg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afe461d27b9c48d5921c00d521181f12f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void loop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00533">533</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__task_8c_source.html#l00043">atexit()</a>, and <a class="el" href="user__task_8c_source.html#l00113">loop_wrapper()</a>.</p>

</div>
</div>
<a class="anchor" id="aa527aed56b3e044b16d50ca2f6eeb04d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void ms_clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction. </p>
<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00136">136</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="af02c169744cad045548cd4d79e6205e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void ms_init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize 1000HZ timer task. </p>
<dl class="section return"><dt>Returns</dt><dd>void. </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00166">166</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a579b1507f56ef6a300ed2b6bcb2dca80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> unsigned long ms_read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read 1000HZ timer We loop in case the update of ms_time is not "atomic" - done in a single instruction. </p>
<dl class="section return"><dt>Returns</dt><dd>time in milliseconds </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00146">146</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="ad00817ae93e26408219a68cadd8424fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ms_task </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>1000HZ timer task </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00158">158</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00166">ms_init()</a>.</p>

</div>
</div>
<a class="anchor" id="a9aaa25ef08319cd23e2cdee0b6405de5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ntp_setup </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00176">176</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a53d692b2f2d330182b01bdd9b7f6e97b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void setup </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="send_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main()</a> Initialize user task </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00971">971</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__task_8c_source.html#l00043">atexit()</a>, <a class="el" href="user__task_8c_source.html#l00113">loop_wrapper()</a>, and <a class="el" href="user__task_8c_source.html#l00160">user_init()</a>.</p>

</div>
</div>
<a class="anchor" id="ab4b988c39b8bd19b13221ca57e721f96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">test_types </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>test byte order and basic type sizes </p>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00783">783</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>.</p>

</div>
</div>
<a class="anchor" id="acf488387a6eadb21c378fffd6f4aae63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void user_help </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00592">592</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00631">user_tests()</a>.</p>

</div>
</div>
<a class="anchor" id="a9c9fec92b60b251c275870d900294a4a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void user_loop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00348">348</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00533">loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a3142086fde2f8b44c81c6f78beff1cc2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">user_tasks </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>second argument 1 = only report when an EOL is detectedEOL </p>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00274">274</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="afbcd3c10e0fec230495931035509d7a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> int user_tests </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>help functions test parser </p>
<ul>
<li>Keywords and arguments are matched against test functions If there are matched the function along with its arguments are called. <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>User supplied command line</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 The return code indicates a command matched. </dd>
<dd>
0 if no rules matched </dd></dl>
</li>
</ul>

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00631">631</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00274">user_tasks()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a0386f377ca8a674321b268989560fa2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int inloop = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00532">532</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00533">loop()</a>.</p>

</div>
</div>
<a class="anchor" id="ab95878c62fafac494a81c106d05c209a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> ip_msg[]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>test task Runs corrected cube demo from Sem Optionally wireframe Earth viewer </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="network_8c_source.html#l00051">51</a> of file <a class="el" href="network_8c_source.html">network.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>, <a class="el" href="network_8c_source.html#l00165">setup_networking()</a>, and <a class="el" href="network_8c_source.html#l00080">wifi_event_cb()</a>.</p>

</div>
</div>
<a class="anchor" id="a45ce2b1d7e9e1d263ef7e624ed7aefcf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long last_time10 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00306">306</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a7d885e2666c9e4d5e3a05031f68f431e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long last_time50 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00307">307</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a8a01319d7589800db081ee759e210eda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int loop_cnt = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00310">310</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab3dd732d619a1e8ab21460d8c002a5e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long ms_time = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00127">127</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00136">ms_clear()</a>, <a class="el" href="user__main_8c_source.html#l00166">ms_init()</a>, <a class="el" href="user__main_8c_source.html#l00146">ms_read()</a>, and <a class="el" href="user__main_8c_source.html#l00158">ms_task()</a>.</p>

</div>
</div>
<a class="anchor" id="ae406634b9e0b25eda1da44f1d4ec26c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ntp_init = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00175">175</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00176">ntp_setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a1559c6c23b2e6367e59be081c3b76d54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a> sec = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00308">308</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00176">ntp_setup()</a>, <a class="el" href="time_8c_source.html#l00552">tm2epoch()</a>, and <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="ae112d79896ed83ac05e155da60e85523"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="time_8h.html#a3346b04b0420b32ccf6b706551b70762">time_t</a> seconds = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00293">293</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="time_8c_source.html#l00882">clock_set()</a>, <a class="el" href="time_8c_source.html#l01227">display_clock()</a>, <a class="el" href="time_8c_source.html#l01178">initialize_clock()</a>, <a class="el" href="time_8c_source.html#l00919">setdate_r()</a>, <a class="el" href="time_8c_source.html#l00347">timegm()</a>, <a class="el" href="time_8c_source.html#l00552">tm2epoch()</a>, and <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a4b92bd10367d44d30a6d932d9f13b79b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int signal_loop = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00291">291</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

</div>
</div>
<a class="anchor" id="a13f77b252237844d7b8b6e3c3047fe50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int skip = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="user__main_8c_source.html#l00304">304</a> of file <a class="el" href="user__main_8c_source.html">user_main.c</a>.</p>

<p>Referenced by <a class="el" href="bdffontutil_8c_source.html#l01240">FontAdjustFull()</a>, and <a class="el" href="bdffontutil_8c_source.html#l01325">FontAdjustSmall()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:17 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
